package com.example.dell.fastshopping.charge.model;

import android.arch.lifecycle.LiveData;
import android.arch.lifecycle.MutableLiveData;
import android.arch.lifecycle.ViewModel;

import com.example.dell.fastshopping.charge.entity.ChargeEntity;
import com.example.dell.fastshopping.network.ApiService;
import com.example.dell.fastshopping.network.NetCallback;
import com.example.dell.fastshopping.network.RetrofitClient;

/**
 * Created by ${YSH} on 2019/4/26.
 * 描述        ${TODO}
 * <p>
 * 更新者       $author$
 * 更新时间     $Data$
 * 描述         ${TODO}
 */
public class ChargeDetialModel extends ViewModel {
    private MutableLiveData charge = new MutableLiveData<ChargeEntity>();
    private ApiService service = RetrofitClient.getInstance().create(ApiService.class);

    public LiveData<ChargeEntity> getChargeList() {
//        RetrofitClient.execute(service.getChargeList(), new NetCallback<ChargeEntity>() {
//            @Override
//            public void netCallback(ChargeEntity chargeEntity) {
//                charge.setValue(chargeEntity);
//            }
//        });
       return charge;
    }
}
